variable "charging_mode" {
  type        = string
  default     = null
  description = "Specifies the charging mode of the RDS DB instance"
}

variable "period_unit" {
  type        = string
  default     = null
  description = "Specifies the charging period unit of the RDS DB instance. Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. Changing this creates a new resource."
}

variable "period" {
  type        = number
  default     = null
  description = "Specifies the charging period of the RDS DB instance. If period_unit is set to month, the value ranges from 1 to 9. If period_unit is set to year, the value ranges from 1 to 3. This parameter is mandatory if charging_mode is set to prePaid. Changing this creates a new resource."
}

variable "db_instance_name" {
  type        = string
  default     = null
  description = "Specifies the DB instance name"
}

variable "db_engines" {
  type        = string
  default     = null
  description = "database engines,the value can be MySQL,PostgreSQL,Microsoft SQL Server"
}

variable "db_version" {
  type        = string
  default     = null
  description = "Specifies the database version"
}

variable "db_instance_storage_type" {
  type        = string
  default     = null
  description = "Specifies the volume type,the value can be ULTRAHIGH,LOCALSSD,CLOUDSSD,ESSD"
}

variable "group_type" {
  type = string
  default = null
  description = "Specifies the performance specification."
}

variable "db_availability_zone" {
  type        = list(string)
  default     = null
  description = "Specifies the availability zone in which to create the instance."
}

variable "time_zone" {
  type        = string
  default     = null
  description = " Specifies the UTC time zone. For MySQL and PostgreSQL Chinese mainland site and international site use UTC by default. "
}

variable "disk_encryption_id" {
  type        = string
  default     = null
  description = "Specifies the key ID for disk encryption"
}

variable "db_allocated_storage" {
  type        = number
  default     = null
  description = "the size of database, in GB."
}

variable "db_port" {
  type        = number
  default     = null
  description = "Specifies the database port"
}

variable "db_password" {
  type        = string
  sensitive   = true
  nullable    = false
  description = "database password."
}

variable "vpc_id" {
  type        = string
  default     = null
  description = " Specifies the VPC ID. "
}

variable "security_group_id" {
  type        = string
  default     = null
  description = " Specifies the VPC ID. "
}

variable "subnet_id" {
  type        = string
  default     = null
  description = " Specifies the VPC ID. "
}

variable "param_group_id" {
  type        = string
  default     = null
  description = "Specifies the parameter group ID."
}

variable "keep_days" {
  type        = number
  default     = null
  description = "Specifies the retention days for specific backup files. The value range is from 0 to 732. If this parameter is not specified or set to 0, the automated backup policy is disabled."
}

variable "start_time" {
  type        = string
  default     = null
  description = "Specifies the backup time window. Automated backups will be triggered during the backup time window."
}

variable "replication_mode" {
  type        = string
  default     = null
  description = "async、semisync、sync"
}

variable "mysql_configuration" {
  description = "The configuration for rds database resources to which the rds belongs"
  type = list(object({
    name = string
    character_set = string
  }))
  default = null
}

variable "rds_tags" {
  description = "The tags configuration of the ECS instance"
  type    = map(string)
  default = {}
}

variable "name_suffix" {
  description = "The suffix string of name for all rds subnet resources"
  type    = string
  default = ""
}

variable "is_rds_creat" {
  type = bool
  default = true
}

variable "flavor" {
  type    = string
  default = null
}